import { h } from "@vue/runtime-dom";
import homeVue from "../lib/base/home.vue";
import adminVue from "../lib/base/admin.vue";
import stoneChildren from "./Pages/stone-router";
import adminChildren from "./Pages/admin-router";
const useModule = ({
  title = "测试模块",
  path = "/test/",
  children = [],
  verify = 1,
  base = homeVue,
}: any) => {
  return {
    path,
    component: h(base, {
      moduleName: title,
      parentPath: path,
      routeList: children,
    }),
    meta: {
      verify,
      title,
    },
    children,
  };
};

export default [
  useModule({
    title: "5G砂石",
    path: "/stone/",
    children: [...stoneChildren],
  }),
  useModule({
    title: "后台管理",
    path: "/admin/",
    base: adminVue,
    verify: 3,
    children: [...adminChildren],
  }),
];
